<?php 
class ConfigController extends Controller{
	public $db;
	public function __init(){
		$this->db=K('Config');
	}
	public function set(){
		if(IS_POST){
			if($this->db->updateConfig()){
				$this->success('更新配置项成功','index');
			}else{
				$this->error($this->db->error);
			}
		}else{
			$config=$this->db->get();
			$this->assign('config',$config);
			$this->display();
		}
	}
}



?>